<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>地址栏</title>
    <script>
        function f1(){
            // 返回当前窗口的Location对象
            // 其中href属性表示当前窗口的地址栏
            console.log(window.location)
            // 可以通过改变href属性的方式实现页面的跳转
            location.href = "36-练习.html";
        }
        function f2(){
            console.log(window.opener.location);
            opener.location.href = "27-菜单的隐藏与显示.html";
        }
        function f3(){
            console.log(window.parent.location);
            parent.location.href = "33-事件冒泡.html";
        }
    </script>
</head>
<body>
<button onclick="f1()">当前窗口地址栏</button><br>
<button onclick="f2()">获取打开该窗口的窗口</button><br>
<button onclick="f3()">获取父窗口</button>
</body>
</html>